Storage devices using semiconductor elements are broadly classified into two categories: a volatile storage device that loses stored data when power supply stops, and a non-volatile storage device that holds stored data even when power supply stops.
A typical example of a volatile storage device is a dynamic random access memory (DRAM). A DRAM stores data in such a manner that a transistor included in a storage element is selected and charge is stored in a capacitor. Thus, when data is read from a DRAM, charge in a capacitor is lost, so that another writing operation is necessary whenever data is read. Moreover, since leakage current (off-state current) or the like flows between a source and a drain of a transistor included in a storage element when the transistor is in an off-state, charge flows into or out even if the transistor is not selected, which makes a data holding period short. For that reason, another writing operation (refresh operation) is necessary at predetermined intervals, and it is difficult to sufficiently reduce power consumption. Furthermore, since stored data is lost when power supply stops, an additional storage device using a magnetic material or an optical material is needed in order to hold the data for a long time.
Another example of a volatile storage device is a static random access memory (SRAM). An SRAM holds stored data by using a circuit such as a flip-flop and thus does not need refresh operation. This means that an SRAM has an advantage over a DRAM. However, cost per storage capacity is increased because a circuit such as a flip-flop is used. Moreover, as in a DRAM, stored data in an SRAM is lost when power supply stops.
A typical example of a non-volatile storage device is a flash memory. A flash memory includes a floating gate between a gate electrode and a channel formation region of a transistor and stores data by holding charge in the floating gate. Therefore, a flash memory has advantages in that the data holding period is extremely long (almost permanent) and refresh operation which is necessary in a volatile storage device is not needed (e.g., see Patent Document 1).
However, a gate insulating layer included in a storage element deteriorates by tunneling current generated at the time of writing, so that the storage element stops its function after a given number of times of writing operation. In order to reduce adverse effects of the problem of lifetime, a method in which the number of times of writing operation of storage elements is equalized is employed, for example. However, a complicated peripheral circuit is needed to carry out this method. Moreover, even when such a method is employed, the fundamental problem of lifetime cannot be solved. That is, a flash memory is not suitable for applications in which data is frequently rewritten.
Further, high voltage is necessary in order to inject charge into the floating gate or remove the charge, and a circuit therefor is required. Therefore, there is a problem of high power consumption. Furthermore, it takes a relatively long time to inject or remove charge, and it is not easy to perform writing and erasing at higher speed.